home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.orig.lzh / relay / io.c < prev    next >
C/C++ Source or Header  |  1989-06-27  |  465b  |  28 lines

  1. /*
  2.  * common i/o operations
  3.  */
  4.  
  5. #include <stdio.h>
  6. #include <sys/types.h>
  7. #include "news.h"
  8. #include "headers.h"
  9. #include "article.h"
  10. #include "msgs.h"
  11.  
  12. /*
  13.  * If *fpp is non-null, fclose it and check for errors.
  14.  * On error, call fulldisk(art, name).
  15.  */
  16. void
  17. nnfclose(art, fpp, name)
  18. struct article *art;
  19. register FILE **fpp;
  20. char *name;
  21. {
  22.     if (*fpp != NULL) {
  23.         if (nfclose(*fpp) == EOF)
  24.             fulldisk(art, name);
  25.         *fpp = NULL;        /* mark the stream closed */
  26.     }
  27. }
  28.